package com.zkthink.ceres.common.enums;

import com.zkthink.exception.BizException;
import lombok.Getter;

@Getter
public enum ExchangeTypeEnum {
    VIP_EXCHANGE(1, "VIP类型变化"),
    HN_EXCHANGE(2, "红娘类型变化"),
    CONSULTANT_EXCHANGE(3, "心理咨询师类型变化"),
    MANAGER_EXCHANGE(4, "店长类型变化"),
    SERVICE_EXCHANGE(5, "客服类型变化"),
    LAWYER_EXCHANGE(6, "律师咨询师类型变化");

    private int code;

    private String desc;

    ExchangeTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static ExchangeTypeEnum getDscByType(Integer type) {
        for (ExchangeTypeEnum p : values()) {
            if (p.getCode() == type.intValue()) {
                return p;
            }
        }
        throw new BizException("no support promotionPlan");
    }
}
